home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / pcmcli_1 / CLIENT.FRM next >
Text File  |  1999-04-09  |  3KB  |  112 lines

  1. VERSION 5.00
  2. Object = "{3E7AEF75-EEC0-11D2-8B43-000000000000}#2.0#0"; "PCMClient.ocx"
  3. Begin VB.Form client 
  4.    Caption         =   "Sample Client"
  5.    ClientHeight    =   3840
  6.    ClientLeft      =   60
  7.    ClientTop       =   345
  8.    ClientWidth     =   4680
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   3840
  11.    ScaleWidth      =   4680
  12.    StartUpPosition =   3  'Windows Default
  13.    Begin VB.TextBox Text4 
  14.       Height          =   285
  15.       Left            =   3120
  16.       TabIndex        =   4
  17.       Text            =   "1001"
  18.       Top             =   2640
  19.       Width           =   1095
  20.    End
  21.    Begin VB.TextBox Text3 
  22.       Height          =   285
  23.       Left            =   720
  24.       TabIndex        =   3
  25.       Top             =   2640
  26.       Width           =   1935
  27.    End
  28.    Begin PCMClient.PCM_Client PCM_Client1 
  29.       Left            =   120
  30.       Top             =   120
  31.       _ExtentX        =   1085
  32.       _ExtentY        =   1085
  33.    End
  34.    Begin VB.TextBox Text2 
  35.       Height          =   285
  36.       Left            =   120
  37.       MultiLine       =   -1  'True
  38.       TabIndex        =   2
  39.       Top             =   3360
  40.       Width           =   3135
  41.    End
  42.    Begin VB.TextBox Text1 
  43.       Height          =   2415
  44.       Left            =   0
  45.       MultiLine       =   -1  'True
  46.       TabIndex        =   1
  47.       Top             =   0
  48.       Width           =   4695
  49.    End
  50.    Begin VB.CommandButton Command1 
  51.       Caption         =   "Connect"
  52.       Height          =   495
  53.       Left            =   3360
  54.       TabIndex        =   0
  55.       Top             =   3120
  56.       Width           =   1215
  57.    End
  58.    Begin VB.Label Label3 
  59.       Caption         =   "Message:"
  60.       Height          =   255
  61.       Left            =   120
  62.       TabIndex        =   7
  63.       Top             =   3120
  64.       Width           =   2535
  65.    End
  66.    Begin VB.Label Label2 
  67.       Caption         =   "#"
  68.       Height          =   255
  69.       Left            =   2880
  70.       TabIndex        =   6
  71.       Top             =   2640
  72.       Width           =   375
  73.    End
  74.    Begin VB.Label Label1 
  75.       Caption         =   "Name:"
  76.       Height          =   255
  77.       Left            =   120
  78.       TabIndex        =   5
  79.       Top             =   2640
  80.       Width           =   1215
  81.    End
  82. End
  83. Attribute VB_Name = "client"
  84. Attribute VB_GlobalNameSpace = False
  85. Attribute VB_Creatable = False
  86. Attribute VB_PredeclaredId = True
  87. Attribute VB_Exposed = False
  88. ' this sample project will show you
  89. ' how to use the Client to make a real
  90. ' time chat room
  91. ' any one who logs in to the server sample
  92. ' project can chat
  93.  
  94. Private Sub Command1_Click()
  95. PCM_Client1.HostName = Text3.Text
  96. PCM_Client1.PortNum = Text4.Text
  97. PCM_Client1.Connect
  98. End Sub
  99.  
  100. Private Sub Form_Load()
  101.  
  102. End Sub
  103.  
  104. Private Sub PCM_Client1_DataArrival()
  105. Text1.Text = PCM_Client1.Data
  106. End Sub
  107.  
  108. Private Sub Text2_Change()
  109. PCM_Client1.Data = Text2.Text
  110. PCM_Client1.SendData
  111. End Sub
  112.